** Minimum Wage and Real Wage Inequality: Evidence from Pass-Through to Retail Prices
** JHL 

****************************************************
** [1] Run R files in folder 01_price_index 
****************************************************

** Read and use "${path_do}/data_prep/01_price_index/PIq_readme.sbatch"

****************************************************
** [2] Run R files in folder 02_flexibility_measures 
****************************************************

** Read and use "${path_do}/data_prep/02_flexibility_measures/readme.sbatch"

****************************************************
** [3] Data preparation in Stata 
****************************************************

** [3.0] Set Stata path 

include "/scratch/midway2/jleung/replication/do/set_path.do"

** [3.1] Prepare MW announcement data

include "${path_do}/data_prep/03_data_prep/c01_mw_enact_announce_vz.do" 

** [3.2] Prepare store price indices 

include "${path_do}/data_prep/03_data_prep/c02_merge_PIq_06_15.do" 

** [3.3] Clean controls 

** County population 
include "${path_do}/data_prep/03_data_prep/c03_county_pop.do" 
** QCEW variables  
include "${path_do}/data_prep/03_data_prep/c03_qcew_county.do" 
** Housing prices 
include "${path_do}/data_prep/03_data_prep/c03_clean_housing_prices.do" 
** ACS household income 
include "${path_do}/data_prep/03_data_prep/c03_acs_hh_income.do" 
** Unemployment rate 
include "${path_do}/data_prep/03_data_prep/c03_laus_counties.do" 

** [3.4] Merge store prices with MW and controls 
include "${path_do}/data_prep/03_data_prep/c04_merge_PIq_stores_mw_0615.do" 

** [3.5] Clean QWI labor market data, merge with MW and controls 
include "${path_do}/data_prep/03_data_prep/c05_qwi_extract_from_raw.do" 
include "${path_do}/data_prep/03_data_prep/c05_merge_qwi_mw.do" 

** [3.6] Clean CPI data 
include "${path_do}/data_prep/03_data_prep/c06_cpi.do"

** [3.7] Clean ACS data for calibrations 
include "${path_do}/data_prep/03_data_prep/c07_acs_mwshares_0615_06q1.do"

****************************************************
** [4] Analysis in Stata
****************************************************

** [4.1] Table 1-3, Figure 4a-4c 
include "${path_do}/analyze/a01_PIq_stores_reg_0615.do" 

** [4.2] Table 4 
include "${path_do}/analyze/a02_qwi_mw_labor_mkt_effects.do" 

** [4.3] Table 5
include "${path_do}/analyze/a03_acs_mwshares_0615_06q1.do" 
** Combine results with excel ${path_out}/analyze/a03_mw_cpt.xlsx 
include "${path_do}/analyze/a03_mw_theoretical_estimates_hh.do" 
** Combine results with excel "${path_do}/analyze/a03_mw_dpt.xlsx"

** [4.4] Figure 1
include "${path_do}/analyze/a04_PI_plots_cpi_vs_nielsen.do" 

** [4.5] Figure 2
include "${path_do}/analyze/a05_mw.do" 

** [4.5] Figure 3
include "${path_do}/analyze/a06_mw_enact_announce_vz.do" 

** [4.6] Figure 5 
include "${path_do}/analyze/a07_similarity_top1.do"